import http from '@/utils/http/axios';

//获取用户列表
export function fetchUserListPage(params) {
    return http.request({
        url: '/system/user/fetchUserListPage',
        method: 'get',
        params,
    });
}
//添加用户
export function addUser(params) {
    return http.request({
        url: '/system/user/addUser',
        method: 'post',
        params
    })
}

//删除用户
export function deleteUser(params) {
    return http.request({
        url: `/system/user/deleteUser/${params}`,
        method: 'delete',
    })
}

//更改用户状态（启用/停用）
export function updateUserStatus(params) {
    return http.request({
        url: `/system/user/updateUserStatus/${params}`,
        method: 'put',
    })
}

//更新用户
export function updateUser(params) {
    return http.request({
        url: `/system/user/updateUser`,
        method: 'put',
        params
    })
}